package cn.zzz.openplatform.amap.model.weather;

import cn.zzz.openplatform.amap.constant.AmapUrlConstant;
import cn.zzz.openplatform.amap.model.AmapOpenApiRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 高德地图 实况天气 请求
 * <a href="https://lbs.amap.com/api/webservice/guide/api-advanced/weatherinfo">接口文档</a>
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class AmapWeatherInfoBaseRequest extends AmapOpenApiRequest<AmapWeatherInfoBaseResponse> {
    /**
     * 城市编码
     * 是否必填： 是
     * 输入城市的adcode，adcode信息可参考城市编码表
     * @see <a href="https://lbs.amap.com/api/webservice/download">城市编码表</a>
     */
    private String city;

    /**
     * 气象类型
     * 是否必填： 否
     * 可选值：base/all
     * base:返回实况天气
     * all:返回预报天气
     */
    private static final String extensions = "base";


    public AmapWeatherInfoBaseRequest(String city) {
        this.city = city;
    }

    @Override
    public Class<AmapWeatherInfoBaseResponse> getResponseClass() {
        return AmapWeatherInfoBaseResponse.class;
    }

    @Override
    public String getUrl() {
        return AmapUrlConstant.WEATHER_URL;
    }
}
